﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MatchDisp.Util;

namespace MatchDisp.MatchIterm
{
    public class MatchItem
    {
        public int xPre, yPre, wPre, hPre;
        public int xPost, yPost, wPost, hPost;
//        public double score;

        public MatchItem(string line)
        {
            string[] words = line.Split(StringUtil.WHITE_CHAR_DOT, StringSplitOptions.RemoveEmptyEntries);
            xPre = int.Parse(words[0]);
            yPre = int.Parse(words[1]);
            wPre = int.Parse(words[2]);
            hPre = int.Parse(words[3]);
            xPost = int.Parse(words[4]);
            yPost = int.Parse(words[5]);
            wPost = int.Parse(words[6]);
            hPost = int.Parse(words[7]);
//            score = double.Parse(words[8]);
        }

        public System.Drawing.Rectangle GetPreMatchRect()
        {
            return new System.Drawing.Rectangle(xPre, yPre, wPre, hPre);
        }

        public System.Drawing.Rectangle GetPostMatchRect()
        {
            return new System.Drawing.Rectangle(xPost, yPost, wPost, hPost);
        }
    }
}
